package com.xyx.dao;

import com.xyx.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {

    SysUser getUserByUsernameAndPwd(SysUser sysUser);
    /**
     *
     * 用户表
     * */
    List<SysUser> getAllUsers(@Param("username")String username);
    /**
     * 根据id查用户
     */
    SysUser getUserById(@Param("id") Integer id);
    /**
     * 新增用户
     */
    int addUser(SysUser sysUser);
    /**
     * 修改用户
     */
    int editUser(SysUser sysUser);
    /**
     * 删除用户
     */
    int deleteUserById(@Param("id") Integer id);
    /**
     * 批量删除
     */
    int deleteAll(@Param("ids") List<String> ids);
    /*
     *根据用户名查询用户
     * */
    SysUser getUserByUsername(String username );

    int editPassword (@Param("id") Integer id,@Param("password") String password);
}
